Optimal. Leaf size=97 \[ \frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b n x^3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b^2 n^2 x^3}{3 \left (4 b^2 n^2+9\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4488, 30} \[ \frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b n x^3 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{4 b^2 n^2+9}+\frac {2 b^2 n^2 x^3}{3 \left (4 b^2 n^2+9\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 4488
Rubi steps
\begin {align*} \int x^2 \cos ^2\left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{9+4 b^2 n^2}+\frac {2 b n x^3 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{9+4 b^2 n^2}+\frac {\left (2 b^2 n^2\right ) \int x^2 \, dx}{9+4 b^2 n^2}\\ &=\frac {2 b^2 n^2 x^3}{3 \left (9+4 b^2 n^2\right )}+\frac {3 x^3 \cos ^2\left (a+b \log \left (c x^n\right )\right )}{9+4 b^2 n^2}+\frac {2 b n x^3 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{9+4 b^2 n^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 61, normalized size = 0.63 \[ \frac {x^3 \left (6 b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+9 \cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+4 b^2 n^2+9\right )}{6 \left (4 b^2 n^2+9\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 76, normalized size = 0.78 \[ \frac {2 \, b^{2} n^{2} x^{3} + 6 \, b n x^{3} \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right ) \sin \left (b n \log \relax (x) + b \log \relax (c) + a\right ) + 9 \, x^{3} \cos \left (b n \log \relax (x) + b \log \relax (c) + a\right )^{2}}{3 \, {\left (4 \, b^{2} n^{2} + 9\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.53, size = 833, normalized size = 8.59 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.07, size = 0, normalized size = 0.00 \[ \int x^{2} \left (\cos ^{2}\left (a +b \ln \left (c \,x^{n}\right )\right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.38, size = 301, normalized size = 3.10 \[ \frac {3 \, {\left (2 \, {\left (b \cos \left (2 \, b \log \relax (c)\right ) \sin \left (4 \, b \log \relax (c)\right ) - b \cos \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) + b \sin \left (2 \, b \log \relax (c)\right )\right )} n + 3 \, \cos \left (4 \, b \log \relax (c)\right ) \cos \left (2 \, b \log \relax (c)\right ) + 3 \, \sin \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) + 3 \, \cos \left (2 \, b \log \relax (c)\right )\right )} x^{3} \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 3 \, {\left (2 \, {\left (b \cos \left (4 \, b \log \relax (c)\right ) \cos \left (2 \, b \log \relax (c)\right ) + b \sin \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) + b \cos \left (2 \, b \log \relax (c)\right )\right )} n - 3 \, \cos \left (2 \, b \log \relax (c)\right ) \sin \left (4 \, b \log \relax (c)\right ) + 3 \, \cos \left (4 \, b \log \relax (c)\right ) \sin \left (2 \, b \log \relax (c)\right ) - 3 \, \sin \left (2 \, b \log \relax (c)\right )\right )} x^{3} \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 2 \, {\left (4 \, {\left (b^{2} \cos \left (2 \, b \log \relax (c)\right )^{2} + b^{2} \sin \left (2 \, b \log \relax (c)\right )^{2}\right )} n^{2} + 9 \, \cos \left (2 \, b \log \relax (c)\right )^{2} + 9 \, \sin \left (2 \, b \log \relax (c)\right )^{2}\right )} x^{3}}{12 \, {\left (4 \, {\left (b^{2} \cos \left (2 \, b \log \relax (c)\right )^{2} + b^{2} \sin \left (2 \, b \log \relax (c)\right )^{2}\right )} n^{2} + 9 \, \cos \left (2 \, b \log \relax (c)\right )^{2} + 9 \, \sin \left (2 \, b \log \relax (c)\right )^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.70, size = 66, normalized size = 0.68 \[ \frac {x^3}{6}+\frac {x^3\,{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,\frac {1}{{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}}\,1{}\mathrm {i}}{8\,b\,n+12{}\mathrm {i}}+\frac {x^3\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}}{12+b\,n\,8{}\mathrm {i}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \begin {cases} \int x^{2} \cos ^{2}{\left (a - \frac {3 i \log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = - \frac {3 i}{2 n} \\\int x^{2} \cos ^{2}{\left (a + \frac {3 i \log {\left (c x^{n} \right )}}{2 n} \right )}\, dx & \text {for}\: b = \frac {3 i}{2 n} \\\frac {2 b^{2} n^{2} x^{3} \sin ^{2}{\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{12 b^{2} n^{2} + 27} + \frac {2 b^{2} n^{2} x^{3} \cos ^{2}{\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{12 b^{2} n^{2} + 27} + \frac {6 b n x^{3} \sin {\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )} \cos {\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{12 b^{2} n^{2} + 27} + \frac {9 x^{3} \cos ^{2}{\left (a + b n \log {\relax (x )} + b \log {\relax (c )} \right )}}{12 b^{2} n^{2} + 27} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________